//
//  MyCell.m
//  Travel
//
//  Created by 吴品泽 on 15/4/12.
//  Copyright (c) 2015年 &#21556;&#21697;&#27901;. All rights reserved.
//

#import "MyCell.h"

@implementation MyCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.setImageView = [[UIImageView alloc]init];
        self.setLabel = [[UILabel alloc]init];
        self.setDetalLabel = [[UILabel alloc]init];
        self.swich = [[UISwitch alloc]init];
        [self.contentView addSubview:self.setImageView];
        [self.contentView addSubview:self.setLabel];
        [self.contentView addSubview:self.setDetalLabel];
    }
    
    return self;
}


- (void)layoutSubviews
{
    [super layoutSubviews];
    
    self.setImageView.frame = CGRectMake(10, 10, 30, self.contentView.frame.size.height - 20);
    self.setLabel.frame = CGRectMake(80, 10, 100, self.contentView.frame.size.height - 20);
    self.setDetalLabel.frame = CGRectMake(self.contentView.frame.size.width - 80, 10, 70, self.contentView.frame.size.height - 20);
    
    [self.swich addTarget:self.TargetAction action:@selector(changeViewAlph:) forControlEvents:UIControlEventValueChanged];
    
}



- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
